package com.youmu.shop.system.bean;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class Shop implements Serializable {
    /**
     * 圈子主键
     * 表字段 : xx_shop.id
     */
    private Long id;

    /**
     * 圈子名称
     * 表字段 : xx_shop.name
     */
    private String name;

    /**
     * 圈子位置
     * 表字段 : xx_shop.position
     */
    private String position;

    /**
     * 圈子介绍
     * 表字段 : xx_shop.intro
     */
    private String intro;

    /**
     * 圈子状态(启用，不可用，停业，休业)
     * 表字段 : xx_shop.shop_status
     */
    private Integer shopStatus;

    /**
     * 圈子负责人& 关联admin表
     * 表字段 : xx_shop.header
     */
    private String header;

    /**
     * 圈子类型(1是自己配送，2是闪送)
     * 表字段 : xx_shop.post_type
     */
    private Integer postType;

    /**
     * 圈子运费白天费用
     * 表字段 : xx_shop.day_price
     */
    private BigDecimal dayPrice;

    /**
     * 圈子运费晚上费用
     * 表字段 : xx_shop.nigt_price
     */
    private BigDecimal nigtPrice;

    /**
     * 圈子配送晚上开始时间
     * 表字段 : xx_shop.begin_date
     */
    private Date beginDate;

    /**
     * 圈子电话
     * 表字段 : xx_shop.telphone
     */
    private String telphone;

    /**
     * 圈子信息创建时间
     * 表字段 : xx_shop.create_date
     */
    private Date createDate;

    /**
     * 圈子信息最新修改时间
     * 表字段 : xx_shop.modify_date
     */
    private Date modifyDate;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table xx_shop
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * 快递配送费
     */
    private BigDecimal shippingFreight;
    
    public Long getShippingMethod() {
		return this.name.contains("圆通")  ? 5L : 7L;
	}

	public BigDecimal getShippingFreight() {
		return shippingFreight;
	}

	public void setShippingFreight(BigDecimal shippingFreight) {
		this.shippingFreight = shippingFreight;
	}

	public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position == null ? null : position.trim();
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro == null ? null : intro.trim();
    }

    public Integer getShopStatus() {
        return shopStatus;
    }

    public void setShopStatus(Integer shopStatus) {
        this.shopStatus = shopStatus;
    }

    public String getHeader() {
        return header;
    }

    public void setHeader(String header) {
        this.header = header == null ? null : header.trim();
    }

    public Integer getPostType() {
        return postType;
    }

    public void setPostType(Integer postType) {
        this.postType = postType;
    }

    public BigDecimal getDayPrice() {
        return dayPrice;
    }

    public void setDayPrice(BigDecimal dayPrice) {
        this.dayPrice = dayPrice;
    }

    public BigDecimal getNigtPrice() {
        return nigtPrice;
    }

    public void setNigtPrice(BigDecimal nigtPrice) {
        this.nigtPrice = nigtPrice;
    }

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone == null ? null : telphone.trim();
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", position=").append(position);
        sb.append(", intro=").append(intro);
        sb.append(", shopStatus=").append(shopStatus);
        sb.append(", header=").append(header);
        sb.append(", postType=").append(postType);
        sb.append(", dayPrice=").append(dayPrice);
        sb.append(", nigtPrice=").append(nigtPrice);
        sb.append(", beginDate=").append(beginDate);
        sb.append(", telphone=").append(telphone);
        sb.append(", createDate=").append(createDate);
        sb.append(", modifyDate=").append(modifyDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}